<?php

namespace App\Repositories;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Repositories\Menu
 *
 * @property int $id
 * @property string|null $title
 * @property string|null $icon
 * @property string|null $href
 * @property int|null $parent_id
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property string|null $permission
 * @property int|null $order 排序
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Menu[] $children
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereHref($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereIcon($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereOrder($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereParentId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu wherePermission($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Repositories\Menu whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class Menu extends Model
{

    public function children(){
        return $this->hasMany('App\Menu','parent_id');
    }
}
